package com.cyh.core.framework.domain.entity.log;

import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
 * @Author: yanhang_chen
 * @Date: 2020/9/7 9:39
 */

@Entity
@Table(name = "operation_log")
@Data
public class OperationLog implements Serializable {

    @Id
    private String id;

    @Column(name = "level")
    private Integer level;

    @Column(name = "detail")
    private String detail;

    @Column(name = "runtime")
    private Long runTime;

    @Column(name = "method")
    private String method;

    @Column(name = "args")
    private String args;

    @Column(name = "return_value")
    private String returnValue;

    @Column(name = "user_id")
    private Integer userId;

    @Column(name = "create_time")
    private Date createTime;

    @Override
    public String toString() {
        return "OperationLog{" +
                "id='" + id + '\'' +
                ", level=" + level +
                ", detail='" + detail + '\'' +
                ", runTime=" + runTime +
                ", method='" + method + '\'' +
                ", args='" + args + '\'' +
                ", returnValue='" + returnValue + '\'' +
                ", userId=" + userId +
                ", createTime=" + createTime +
                '}';
    }
}
